home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / lib / python2.6 / dist-packages / launchpadbugs / lpconstants.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-04-20  |  7.8 KB  |  186 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. import os.path as os
  5.  
  6. class BASEURL(object):
  7.     _MAP = (('BUG', 'https://bugs.launchpad.net'), ('BUGLIST', 'https://bugs.launchpad.net'), ('BUGPAGE', 'https://bugs.launchpad.net'), ('BLUEPRINT', 'https://blueprints.launchpad.net'), ('BLUEPRINTLIST', 'https://blueprints.launchpad.net'), ('PROJECTLIST', 'https://launchpad.net'))
  8.  
  9. for i in BASEURL._MAP:
  10.     setattr(BASEURL, *i)
  11.  
  12.  
  13. class BUG:
  14.     STATUS = {
  15.         'statusNEW': 'New',
  16.         'statusINCOMPLETE': 'Incomplete',
  17.         'statusINVALID': 'Invalid',
  18.         'statusWONTFIX': "Won't Fix",
  19.         'statusCONFIRMED': 'Confirmed',
  20.         'statusTRIAGED': 'Triaged',
  21.         'statusINPROGRESS': 'In Progress',
  22.         'statusFIXCOMMITTED': 'Fix Committed',
  23.         'statusFIXRELEASED': 'Fix Released' }
  24.     STATUS_INCOMPLETE_ADD = {
  25.         'INCOMPLETE_WITH_RESPONSE': 'Incomplete w/',
  26.         'INCOMPLETE_WITHOUT_RESPONSE': 'Incomplete w/o' }
  27.     SORT_STATUS = [
  28.         'Fix Released',
  29.         'Fix Committed',
  30.         'In Progress',
  31.         'Triaged',
  32.         'Confirmed',
  33.         "Won't Fix",
  34.         'Invalid',
  35.         'Incomplete',
  36.         'New']
  37.     IMPORTANCE = {
  38.         'importanceUNDECIDED': 'Undecided',
  39.         'importanceWISHLIST': 'Wishlist',
  40.         'importanceLOW': 'Low',
  41.         'importanceMEDIUM': 'Medium',
  42.         'importanceHIGH': 'High',
  43.         'importanceCRITICAL': 'Critical' }
  44.     SORT_IMPORTANCE = [
  45.         'Critical',
  46.         'High',
  47.         'Medium',
  48.         'Low',
  49.         'Wishlist',
  50.         'Undecided']
  51.  
  52.  
  53. class BUGLIST:
  54.     DEFAULT_DISTRO = 'ubuntu'
  55.     COMPONENT_DICT = {
  56.         'main': 1,
  57.         'restricted': 2,
  58.         'universe': 3,
  59.         'multiverse': 4,
  60.         'contrib': 5,
  61.         'non-free': 6,
  62.         'partner': 7 }
  63.  
  64.  
  65. class BLUEPRINT:
  66.     PRIORITY = {
  67.         'specpriorityESSENTIAL': 'Essential',
  68.         'specpriorityHIGH': 'High',
  69.         'specpriorityMEDIUM': 'Medium',
  70.         'specpriorityLOW': 'Low',
  71.         'specpriorityUNDEFINED': 'Undefined',
  72.         'specpriorityNOTFORUS': 'Not' }
  73.     SORT_PRIORITY = [
  74.         'Essential',
  75.         'High',
  76.         'Medium',
  77.         'Low',
  78.         'Undefined',
  79.         'Not']
  80.     STATUS = {
  81.         'specstatusAPPROVED': 'Approved',
  82.         'specstatusPENDINGAPPROVAL': 'Pending Approval',
  83.         'specstatusPENDINGREVIEW': 'Review',
  84.         'specstatusDRAFT': 'Drafting',
  85.         'specstatusDISCUSSION': 'Discussion',
  86.         'specstatusNEW': 'New',
  87.         'specstatusSUPERSEDED': 'Superseded',
  88.         'specstatusOBSOLETE': 'Obsolete' }
  89.     SORT_STATUS = [
  90.         'Approved',
  91.         'Pending Approval',
  92.         'Review',
  93.         'Drafting',
  94.         'Discussion',
  95.         'New',
  96.         'Superseded',
  97.         'Obsolete']
  98.     DELIVERY = {
  99.         'specdeliveryUNKNOWN': 'Unknown',
  100.         'specdeliveryINFORMATIONAL': 'Informational',
  101.         'specdeliveryIMPLEMENTED': 'Implemented',
  102.         'specdeliveryNOTSTARTED': 'Not started',
  103.         'specdeliveryBETA': 'Beta Available',
  104.         'specdeliverySTARTED': 'Started',
  105.         'specdeliveryDEFERRED': 'Deferred',
  106.         'specdeliveryBLOCKED': 'Blocked',
  107.         'specdeliveryGOOD': 'Good progress',
  108.         'specdeliveryAWAITINGDEPLOYMENT': 'Awaiting deployment',
  109.         'specdeliverySLOW': 'Slow progress',
  110.         'specdeliveryNEEDSREVIEW': 'Needs code review',
  111.         'specdeliveryNEEDSINFRASTRUCTURE': 'Needs Infrastructure' }
  112.     SORT_DELIVERY = [
  113.         'Unknown',
  114.         'Not started',
  115.         'Deferred',
  116.         'Needs Infrastructure',
  117.         'Blocked',
  118.         'Started',
  119.         'Slow progress',
  120.         'Good progress',
  121.         'Beta Available',
  122.         'Needs Code Review',
  123.         'Deployment',
  124.         'Implemented',
  125.         'Informational']
  126.  
  127.  
  128. class ATTACHMENTS:
  129.     ATTACHMENT_PATH = '~/.bughelper/attachments-cache'
  130.     CONTENT_TYPES = [
  131.         'text/html']
  132.  
  133.  
  134. class HTTPCONNECTION:
  135.     
  136.     class MODE:
  137.         (DEFAULT, EDGE, STABLE, STAGING) = range(4)
  138.  
  139.  
  140.  
  141. class CONFIG:
  142.     FILE = os.path.expanduser('~/.python-launchpad-bugs.conf')
  143.     COMMENT = '# global configuration for python-launchpad-bugs.\n# user.username: user related identifier shown in the user-agent header\n# test_examples.*: example data for unittests\n# test_config.*:\n# cookies.*: default cookies, please do not modify the values, if you\n#    delete one entry, a new cookie will be generated\n\n'
  144.     DEFAULT = '\n[user]\nlplogin =\n\n[cookies]\nlp =\nedge =\nstaging =\ninhibit_beta_redirect =\n\n[test_examples]\npassword =\nemail =\ncookiefile =\n\n[test_config]\ntests =\nignore =\nmail_cmd =\n'
  145.  
  146.  
  147. class _MODE_WRAPPER(object):
  148.     
  149.     def __init__(self, id, identifier):
  150.         self._MODE_WRAPPER__id = id
  151.         self._MODE_WRAPPER__identifier = identifier
  152.  
  153.     
  154.     def __int__(self):
  155.         return int(self._MODE_WRAPPER__id)
  156.  
  157.     
  158.     def __str__(self):
  159.         return self._MODE_WRAPPER__identifier
  160.  
  161.     
  162.     def __repr__(self):
  163.         return "<MODE '%s'>" % self._MODE_WRAPPER__identifier
  164.  
  165.  
  166.  
  167. class CONNECTOR:
  168.     
  169.     class MODES:
  170.         _MAP = ('HTML', 'TEXT')
  171.         (HTML, TEXT) = map((lambda x: _MODE_WRAPPER(*x)), enumerate(_MAP))
  172.         DEFAULT = HTML
  173.  
  174.     CONNECTIONS = {
  175.         MODES.HTML: {
  176.             'Bug': ('html_bug', ('http_connection', 'HTTPConnection')),
  177.             'BugList': ('html_buglist', ('http_connection', 'HTTPConnection')),
  178.             'Blueprint': ('html_blueprint', ('http_connection', 'HTTPConnection')),
  179.             'BlueprintList': ('html_blueprintlist', ('http_connection', 'HTTPConnection')),
  180.             'ProjectList': ('html_projectlist', ('http_connection', 'HTTPConnection')),
  181.             'ProjectPackageList': ('html_projectlist', ('http_connection', 'HTTPConnection')) },
  182.         MODES.TEXT: {
  183.             'Bug': ('text_bug', ('http_connection', 'HTTPConnection')),
  184.             'BugList': ('text_buglist', ('http_connection', 'HTTPConnection')) } }
  185.  
  186.